package com.amigo.online.provider.video.service;

import java.util.List;

import com.alibaba.fastjson.JSONObject;
import com.amigo.online.common.core.service.IService;
import com.amigo.online.common.param.dto.video.LookVideoDto;
import com.amigo.online.common.param.dto.video.ShareVideoDto;
import com.amigo.online.common.param.dto.video.VideoDto;
import com.amigo.online.common.param.dto.video.VideoQueryDto;
import com.amigo.online.common.param.result.VideoInfo;
import com.amigo.online.common.param.result.VideoWhoSawMeInfo;
import com.amigo.online.common.param.result.VideoWithWaterMarkInfo;
import com.amigo.online.provider.video.model.entity.Video;
import com.amigo.online.provider.video.model.entity.VideoComment;

public interface VideoService extends IService<Video> {


    /**
     * 用户新增视频
     *
     * @param dto
     * @return
     */
    VideoInfo newUserVideo(VideoDto dto);

    /**
     * 根据ID获取视频信息
     *
     * @param id
     * @return
     */
    VideoInfo getVideoInfoById(Long id);

    /**
     * 我观看了一个视频
     *
     * @param id
     * @return
     */
    boolean lookVideoById(long id, long lookTime);

    /**
     * 没登陆观看了一个视频
     *
     * @param id
     * @return
     */
    boolean lookVideoNotLogined(long videoId, long lookTime, String deviceId);

    /**
     * 我点赞了一个视频
     *
     * @param id
     * @return
     */
    boolean upVideoById(Long id);

    /**
     *
     * @Title: upAdvVideoById
     * @Description: (点赞广告视频)
     * @param: @param id
     * @param: @return
     * @return: boolean
     * @throws
     *//*
	boolean upAdvVideoById(Long id);
	
	*//**
     *
     * @Title: removeUpAdvVideo
     * @Description: (取消点赞广告视频)
     * @param: @param id
     * @param: @return
     * @return: boolean
     * @throws
     *//*
	boolean removeUpAdvVideo(Long id);
	
	*//**
     *
     * @Title: commentAdvVideoById
     * @Description: (评论广告视频)
     * @param: @param id
     * @param: @param commentId
     * @param: @param content
     * @param: @return
     * @return: Long
     * @throws
     *//*
	Long commentAdvVideoById(Long id, long commentId, String content);*/

    /**
     * 该视频我是否点赞过
     *
     * @param id
     * @return
     */
    boolean videoUpStatus(Long id);

    /**
     * 取消该视频的点赞
     *
     * @param id
     * @return
     */
    boolean removeUpVideo(Long id);

    /**
     * 发表一个评论
     *
     * @param id
     * @param dto
     * @return
     */
    Long commentVideoById(Long id, long commentId, String content);

    /**
     * 获取我的视频列表
     *
     * @param page
     * @param size
     * @return
     */
    List<VideoInfo> getMyVideos(Integer page, Integer size);

    /**
     * 获取我观看的视频列表
     *
     * @param page
     * @param size
     * @return
     */
    List<VideoInfo> getMyLookedVideos(Integer page, Integer size);

    /**
     * 获取我点赞的视频列表
     *
     * @param page
     * @param size
     * @return
     */
    List<VideoInfo> getMyUpedVideos(Integer page, Integer size);


    /**
     * 获取用户视频列表
     *
     * @param uid
     * @param page
     * @param size
     * @return
     */
    List<VideoInfo> getUserVideos(Long uid, Integer page, Integer size);

    /**
     * 获取用户观看的视频列表
     *
     * @param uid
     * @param page
     * @param size
     * @return
     */
    List<VideoInfo> getUserLookedVideos(Long uid, Integer page, Integer size);

    /**
     * 获取用户点赞的视频列表
     *
     * @param uid
     * @param page
     * @param size
     * @return
     */
    List<VideoInfo> getUserUpedVideos(Long uid, Integer page, Integer size);

    /**
     * 推荐视频(业务变更，新的实现见 recomendedVideoList2方法)
     *
     * @return
     */
    List<VideoInfo> recomendedVideoList(Long deviceId, Integer page, Integer size);

    /**
     * 获取"谁看过我" 视频列表
     *
     * @param longitude
     * @param latitude
     * @param page
     * @param size
     * @return
     */
    List<VideoWhoSawMeInfo> whoSawMe(String longitude, String latitude, Integer page, Integer size);

    /**
     * 获取我收藏的视频列表
     *
     * @param page
     * @param size
     * @return
     */
    List<VideoInfo> getMyCollectVideos(Integer page, Integer size);

    boolean collectVideo(Long videoid);

    boolean cancelCollect(Long videoid);

    List<VideoInfo> getAll();

    List<VideoComment> getComments(Long vid, Integer page, Integer size);

    List<VideoInfo> getVideoInfoByUserIdList(VideoQueryDto dto);

    boolean shareVideo(ShareVideoDto dto);

    boolean deleteComment(Long id, Long vid);

    List<VideoInfo> findNearVideoList(Double[] point, Integer page, Integer size);

    boolean deleteVideoById(Long id);

    List<Long> getUpByVideoId(Long userId, List<Long> videoIds);

    List<VideoInfo> recomendedVideoList2(String deviceId, Integer page, Integer size, Long idNine, Long idTen, String token);

    void updateWaterMarkVideo(String waterMarkUrl, long id);

    VideoWithWaterMarkInfo getVideoWithWatermarkById(Long id);

    Integer getCommentsCount(Long vid);

    VideoInfo getVideoWithWatermarkById(long id);

    boolean updateVideoWaterMarkUrl(Long videoId, String waterMarkUrl);

    boolean updateVideoMusic(Long videoId, Long musicId);

    JSONObject getHomepageVideoCount(Long userId);

    JSONObject sameMusicDetail(Long musicId);

    List<VideoInfo> getVideoInSameMusic(Long musicId, Integer page, Integer size);

    boolean syncDataForAddWaterMark(Integer startId, Integer endId);

    boolean lookVideoByIdV3(LookVideoDto lookVideoDto);

    Integer lookNumber(Long videoId);

    void addWaterMark();
}
